int arrSum(int* arr, int start, int end){
	int x, res = 0;
	for(x = start; x < start + end; x++)
	{
		res += arr[x];
	}
	
	return res;
}
int sumOddLengthSubarrays(int* arr, int arrSize){
    int x = 0;
    int i = 0;
    int k = 0;
    int ans = 0;

    for(x = 1; x <= arrSize; x += 2){
        for(i = 0; i < x; i += x){
            for(k = i; k < arrSize - x + 1;k++){
                ans += arrSum(arr, k ,x);
            }
        }
    }
    return ans;
}